package com.wencst.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import lombok.extern.slf4j.Slf4j;

@Controller
@RequestMapping("/")
@Slf4j
public class Index {

	@RequestMapping("/index") public String index() {
		log.debug("-------------index------------");
		return "/index";
	}

	@RequestMapping("/{page}") public String toPage(
			@PathVariable("page") String page) {
		log.debug("-------------to page------------" + page);
		return "/"+page;
	}
	@RequestMapping("/json/{page}") public String toJsonPage(
			@PathVariable("page") String page) {
		log.debug("-------------to aps page------------" + page);
		return "/json/"+page;
	}
}
